﻿using Admin.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Admin.Areas.Administration.Models
{
    public class MenuModel
    {
        public static  List<TblMenuAdmin> TblMenuAdmin = Load_menu();

        public static List<TblMenuAdmin> Load_menu()
        {
            var db = new BookingDBEntities();
             
            var data = db.TblMenuAdmins.ToList();
            return data;
        }

        public static List<TblMenuAdmin> MenuChildList(int i)
        {
            var db = new BookingDBEntities();
               
            return db.TblMenuAdmins.Where(m => m.ParentId == i).ToList();
        } 
    }
}